package diamondServer.businesslogic.resource;

/**
 * Contains all the data needed for a {@link Resource} creating.
 */
public class ResourceData {
	private String msServiceClass; // for example: server.resources.ServiceFake
	private String msMessageClass;

	public ResourceData(String sServiceClass, String sMessageClass) {
		msServiceClass = sServiceClass;
		msMessageClass = sMessageClass;
	}

	public String getServiceClassName() {
		return msServiceClass;
	}

	public String getMessageClassName() {
		return msMessageClass;
	}
	@Override
	public String toString() {
		return "{"+msMessageClass+", "+msServiceClass+"}";
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result
				+ ((msMessageClass == null) ? 0 : msMessageClass.hashCode());
		result = prime * result
				+ ((msServiceClass == null) ? 0 : msServiceClass.hashCode());
		return result;
	}

	@Override
	/*generated by eclipse */
	public boolean equals(Object obj) {
		if (this == obj)
			return true;

		if (obj == null)
			return false;

		if (!(obj instanceof ResourceData))
			return false;

		ResourceData other = (ResourceData) obj;
		if (msMessageClass == null) {
			if (other.msMessageClass != null) {
				return false;
			}
		} else if (!msMessageClass.equals(other.msMessageClass)) {
			return false;
		}
		if (msServiceClass == null) {
			if (other.msServiceClass != null) {
				return false;
			}
		} else if (!msServiceClass.equals(other.msServiceClass)) {
			return false;
		}
		return true;
	}

}
